<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Layx</title>
    <link href="layx.css" rel="stylesheet" />
</head>

<body>
    <button id='btn1'>打开新窗口</button>
    <button id='btn2'>改变窗口标题</button>
    <button id='btn3'>打开文本窗口</button>
    <button id='btn4'>打开开源中国官网</button>
    <script src="layx.js" type="text/javascript"></script>
    <script type="text/javascript">
        document.getElementById('btn1').onclick = function(e) {
            layx.open({
                id: 'btn1',
                url: './iframe.html',
                useFrameTitle: true
            });
        }
        document.getElementById('btn2').onclick = function(e) {
            layx.setTitle('btn1', '改变标题：Layx.')
        }
        document.getElementById('btn3').onclick = function(e) {
            layx.open({
                id: 'btn3',
                title: 'Layx 文本窗口',
                content: '<div>我是HTML文本内容</div>',
                position: 'rb'
            });
        }
        document.getElementById('btn4').onclick = function(e) {
            layx.open({
                id: 'btn4',
                title: '开源中国官网',
                url: 'http://www.oschina.net',
                shadable: true
            });
        }
    </script>
</body>

</html>